package com.myteam.fugaocrm.sqldb.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.myteam.fugaocrm.modle.FgPosition;

/**
 * 职务Mapper
 * @author BZX
 */
public interface FgPositionMapper {
	/** 查询全部职务 */
	@Select("select * from fg_position where is_delete = 0")
	public List<FgPosition> all();
	
	/** 删除一个职务 */
	@Select("update fg_position set is_delete = 1 where position_id = #{positionId}")
	public void deleteOne(@Param("positionId") Integer positionId);
	
	/** 新增一个职务 */
	@Select("insert into fg_position(position_name,created_date,modified_date,created_user,modified_user) values(#{positionName},#{createdDate},#{modifiedDate},#{createdUser},#{modifiedUser})")
	public void insert(Map<String, Object> params);
	
	/** 修改一个职务 */
	@Select("update fg_position set position_name=#{positionName},created_user=#{createdUser},created_date=#{createdDate},modified_user=#{modifiedUser},modified_date=#{modifiedDate} where position_id = #{positionId}")
	public void update(Map<String, Object> params);
	
	
}
